package com.teatime.client.view;

import android.content.Context;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;


public class TFrameBar extends LinearLayout {
	private View mBarView;
	protected TFrame mFrame;
	
	public TFrameBar(Context context, TFrame frame, int layoutId) {
		super(context);
		ViewGroup.LayoutParams lp = this.getLayoutParams();
		lp.width = ViewGroup.LayoutParams.FILL_PARENT;
		lp.height = ViewGroup.LayoutParams.WRAP_CONTENT;
		setLayoutParams(lp);
		setGravity(Gravity.BOTTOM);
		setOrientation(LinearLayout.HORIZONTAL);
		LayoutInflater factory = LayoutInflater.from(getContext());
		mBarView = factory.inflate(layoutId, null);
		addView(mBarView);
		mFrame = frame;
		mFrame.addView(this);
	}
	
	public TFrame getFrame() {
		return mFrame;
	}
	
}
